package com.ce.pms.custservice.service;

import java.math.BigDecimal;
import java.util.List;

import com.ce.pms.base.service.IPmsBaseService;
import com.ce.pms.base.vo.SearchVO;
import com.ce.pms.custservice.vo.AbstractServiceItemVO;
import com.ce.pms.custservice.vo.DispatchFormSearchVO;
import com.ce.pms.custservice.vo.DispatchFormVO;
import com.ce.pms.custservice.vo.DispatchingVO;
import com.ce.pms.custservice.vo.FeedbackRecordVO;
import com.ce.pms.custservice.vo.FeedbackSearchVO;
import com.ce.pms.custservice.vo.ServItemSearchVO;
import com.sitechasia.webx.core.support.Page;
/**
 *
 * 	名称: com.ce.pms.custservice.service.IDFormManageService <br>
 * 派工单管理接口
 *
 * @author  付湘辉  <br>
 * Created on： 2008-12-15 <br>
 * @author <br>
 * update on： <br>
 * why: <br>
 */
public interface IDFormManageService extends IPmsBaseService {

   /**
    * 功能描述:新增派工单  <br>
    * @param csEventID - 事件ID
    * @param dFormVo
    * @roseuid 493C81AF03C8
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-23  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public DispatchFormVO addDispatchForm(Long csEventID,DispatchFormVO dFormVo);
   
   /**
    * 功能描述:反馈登记  <br>
    * @param dispatchFormID - 派工单ID
    * @param feedbackVo - 反馈Vo
    * @roseuid 49252E8C03A9
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public FeedbackRecordVO addFeedback(Long dispatchFormID, FeedbackRecordVO feedbackVo);
   
   /**
    * 功能描述: 新增服务项目
    * @param dFormID - 派工单ID
    * @param servItem - 服务项目
    * @roseuid 493387810203
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-17  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public AbstractServiceItemVO addServItem(Long dFormID, AbstractServiceItemVO servItemVo);
   
   /**
    * 功能描述:检查指定的派工单是否允许增加账单  <br>
    * @param dispatchFormID
    *
    * Create author:付湘辉 <br>
    * Create on:2009-1-9  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public void checkIsAllowAddBill(Long dispatchFormID);
   
   /**
    * 功能描述:检查指定的派工单是否允许增加反馈  <br>
    * @param dispatchFormID
    *
    * Create author:付湘辉 <br>
    * Create on:2009-1-9  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public void checkIsAllowAddFeedback(Long dispatchFormID);

  /**
    * 功能描述:检查指定的派工单是否允许增加收费项目  <br>
    * @param dispatchFormID 派工单ID
    *
    * Create author:付湘辉 <br>
    * Create on:2009-1-9  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public void checkIsAllowAddServItem(Long dispatchFormID);

   /** 
 * 功能描述:检查指定的派工单是否允许删除服务收费项目  <br>
 * @param dFormID 派工单ID
 *
 * Create author:付湘辉 <br>
 * Create on:2009-1-4  <br>
 * Edit author:  <br>
 * Edit on:    <br>
 * Why:     <br>
*/
public void checkIsAllowDeleteServItem(Long dFormID);
   
   /**
    * 功能描述:检查指定的派工单是否允许接单登记  <br>
    * @param dispatchFormID 派工单ID
    *
    * Create author:付湘辉 <br>
    * Create on:2009-1-9  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public void checkIsAllowDispatching(Long dispatchFormID);

   /** 
    * 功能描述:检查指定的派工单是否允许修改服务收费项目  <br>
	 * @param dFormID 派工单ID
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2009-1-4  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	*/
	public void checkIsAllowEditServItem(Long dFormID);

   /**
	 * 功能描述:检查指定的派工单是否能作废  <br>
	 * @param dFormID
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2009-1-9  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public void checkIsAllowSetAsideDispatchForm(Long dFormID);

   /**
    * 功能描述:检查指定的派工单是否允许作废反馈  <br>
    * @param dispatchFormID
	* @param feedbackId
    *
    * Create author:付湘辉 <br>
    * Create on:2009-1-9  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
 * @param feedbackId TODO
    */
   public void checkIsAllowSetAsideFeedback(Long dispatchFormID, Long feedbackId);

   /**
    * 功能描述: 删除服务项目 <br>
    * @param dFormID - 派工单ID
    * @param servItemID - 服务项目ID
    * @roseuid 4933903100BB
    * @return
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public Boolean deleteServItem(Long dFormID, Long servItemID);

   /**
    * 功能描述:接单  <br>
    * @param dFormID - 派工单ID
    * @param dispatchingVo - 派工单接单Vo对象
    * @roseuid 4925294C005D
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public DispatchingVO dispatching(Long dFormID, DispatchingVO dispatchingVo);
   
   /**
    * 功能描述: 服务项目 <br>
    *
    * @param dFormID - 派工单ID
    * @param servItemVo - 服务项目
    * @roseuid 49338A2400FA
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-17  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public AbstractServiceItemVO editServItem(Long dFormID, AbstractServiceItemVO servItemVo);
	
	/**
		 * 功能描述: 根据服务费用项目id查询一个服务费用项目VO。 <br>
		 * @param serviceItemId
		 * @return
		 *
		 * Create author:付湘辉 <br>
		 * Create on:2008-12-16  <br>
		 * Edit author:  <br>
		 * Edit on:    <br>
		 * Why:     <br>
		 */
		public AbstractServiceItemVO getAbstractServiceItemById(Long serviceItemId);

   /**
    * 功能描述:  处理服务项目,功能说明:
	* <ol>
    * <li> 如果客户端提交的具体一个ServItem实例是新的
    *    (没有被持久化过),那么添加到DO的服务项目集合中.</li>
    * <li> 如果客户端提交的具体一个ServItem实例是游离实
    * 例(曾经被实例化),那么替换DO服务项目集合中的   对应旧实例.</li>
    * <li> 如果在DO中存在的ServItem实例,在客户端本次提
    * 交的List<ServItem>中不存在.则删除DO服务项目   集合中本ServItem实例.</li>
    * </ol>
    * @param dFormID - 派工单ID
    * @return DispatchFormVO
    * @roseuid 493391F3003E
    * @return
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public DispatchFormVO getDFormByID(Long dFormID);

   /**
	 * 功能描述: 根据反馈id查询一个派工单反馈。 <br>
	 * @param feedbackRecordId
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-12-16  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public FeedbackRecordVO getFeedbackRecordById(Long feedbackRecordId);
	
	/**
	 * 功能描述:查询指定派工单的费用清单金额合计  <br>
	 * @param dispatchFormId
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-12-29  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public BigDecimal getServItemTotalFee(Long dispatchFormId);

   /**
    * 功能描述:服务项目维护  <br>
    * @param dFormID - 派工单ID
    * @param servItems - 服务项目列表
    * @return void
    * @roseuid 4936506200FA
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
//   public Boolean servItemMaintain(Long dFormID, List<AbstractServiceItemVO> servItems);

   /**
    * 功能描述: 分页查询派工单 <br>
    * @param searchVO
    * @return Page
    * @roseuid 49435001037A
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-16  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public Page queryDFromByPage(DispatchFormSearchVO searchVO);

   /**
    * 查询派工单列表
    * @param searchVO
    * @return List<DispatchFormVO>
    * @roseuid 49434FCF030D
    */
   @Deprecated
   public List<DispatchFormVO> queryDFromList(SearchVO searchVO);

   /**
    * 功能描述: 分页查询反馈登记 <br>
    * @param searchVO
    * @return
    * @roseuid 49436035029F
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-22  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public Page queryFeedbackRecordByPage(FeedbackSearchVO searchVO);

   /**
    * 功能描述:分页查询服务项目  <br>
    * @param searchVO
    * @return Page
    * @roseuid 49435E2202CE
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-17  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public Page queryServItemByPage(ServItemSearchVO searchVO);
   
   /**
    * 功能描述: 根据派工单ID查询所有服务费用项目 <br>
    * @param dispatchFormId
    * @return
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-17  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public List<AbstractServiceItemVO> queryServItemListByDFormId(Long dispatchFormId);

   /**
   * 功能描述: 作废派工单 <br>
   * @param dFormID - 派工单ID
   * @roseuid 4925281D0261
   *
   * Create author:付湘辉 <br>
   * Create on:2008-12-16  <br>
   * Edit author:  <br>
   * Edit on:    <br>
   * Why:     <br>
   */
   public Boolean setAsideDForm(Long dFormID,String info);

   /**
    * 功能描述:反馈登记作废  <br>
    * @param feedback
    * @roseuid 492A4D770242
    *
    * Create author:付湘辉 <br>
    * Create on:2008-12-17  <br>
    * Edit author:  <br>
    * Edit on:    <br>
    * Why:     <br>
    */
   public Boolean setAsideFeedback(FeedbackRecordVO feedbackVo);


    /* *
    * 分页查询反馈登记
    * @param searchVO
    * @return List<FeedbackRecordVO>
    * @roseuid 49436035029F
    * @author 高嵩
    */
//    public Page queryFeedbackRecordByPage(DispatchFormSearchVO searchVO);
}
